from utils.singleton_base import SingletonBase
from ol_user import OnlineUserList
from poker.poker_base import PokerBase

class Game(SingletonBase):
    poker = PokerBase()
    users = OnlineUserList()

    def start(self):
        while self.poker.hasMore():
            for user in self.users.getAll():
                card = self.poker.getOneCard()
                user.addCmd('DISPATCH_CARD', [user.id, card])
                self.users.broadcastCmd('DISPATCH_CARD_B', [user.id], user.id)
